package com.example.bysj_sb.controller;

import com.example.bysj_sb.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class LogoutController {
    @Autowired
    private LogService loginService;
    @GetMapping("/logout")
    @ResponseBody
    public String logout() {
        String name = loginService.logout();
        System.out.println(name+" 退出登录！");
    return "用户 " + name + " 退出登录！";    }
}
